<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>审核指定人员</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="">
    <link rel="stylesheet" href="${path}/lib/weui.min.css">
    <link rel="stylesheet" href="${path}/css/jquery-weui.css">
    <link rel="stylesheet" href="${path}/css/demos.css?dt=20180224">
</head>

<body ontouchstart>
<header class='demos-header'>
    <h1 class="demos-title">指定维修人员</h1>
</header>

<div class="weui-cells weui-cells_checkbox">
    <c:forEach items="${works}" var="item">
        <label class="weui-cell weui-check__label" for="${item.id}">
            <div class="weui-cell__hd" style="position: relative;margin-right: 10px;">
                <img src="${path}/images/pic_161.jpg" style="width: 50px;display: block">
            </div>
            <div class="weui-cell__bd">
                <p>${item.realname} <span>${item.mobile}</span></p>
                <p style="font-size: 13px;color: #888888;">${item.remark}</p>
            </div>

            <div class="weui-cell__ft">
                <input type="radio" class="weui-check" name="maintain" id="${item.id}" value="${item.id}">
                <i class="weui-icon-checked"></i>
            </div>
        </label>
    </c:forEach>
</div>

<div class="weui-btn-area sub-btn">
    <a class="weui-btn weui-btn_primary" href="javascript:" id="submit">确定</a>
</div>

<jsp:include page="foot.jsp"/>

<script src="${path}/lib/jquery-2.1.4.js"></script>
<script src="${path}/lib/fastclick.js"></script>
<script src="${path}/js/jquery-weui.js"></script>
<script>
    $(function () {
        FastClick.attach(document.body);
    });

    $('#submit').on('click', function () {
        var mainId = $("input[name='maintain']:checked").val();
        var param = {'reportId':${reportId}, "mainId": mainId};
        $.post('${path}/task/sure.do', param, function (result) {
            if (result.success) {
                window.location.href = '${path}/task/wait/sure.do';
            } else {
                $.toptip(result.message);
            }
        }, 'JSON');
    });
</script>
<script src="${path}/js/jquery-weui.js"></script>
</body>
</html>
